package com.flyee.io.socket {
import com.flyee.events.CommandUpSendEvent;
import com.flyee.io.socket.command.up.CommandUp;

import com.flyee.utils.MyLog;

import flash.events.EventDispatcher;

public class CommandUpSender extends EventDispatcher {
	
	public function CommandUpSender()
	{
		
        MyLog.debug("init CommandUpSender")
	}
    public  function send(cmd:CommandUp,eventKey:String=null):void
    {
        SocketConnectionAmf3.getInstance().sendRequest(cmd);
        dispatchEvent(new CommandUpSendEvent(eventKey==null?CommandUpSendEvent.COMMAND_UP:eventKey,cmd));
    }
}
}